package com.olc.railing.constant;

import android.os.Environment;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

public class Constants {
    public static final int ENTRANCE_RECORD = 1;
    public static final int LEAVE_RECORD = 2;
    public static final int OCR_CAMERA_REQUEST_CODE = 102;
    public static final int VEH_HEADER_CAMERA_REQUEST_CODE = 103;
    public static final int PERMISSION_REQUEST_CODE = 104;
    public static final int STORAGE_PERMISSION_REQUEST_CODE = 105;
    public static final int START_UPLOAD_ORDER_TO_SERVER = 110;
    public static final int OCR_VHEPLATE_NO = 111;
    public static final String PUBLIC_KEY = "0429C8DE06AB1F40FFEE4ADDFF516A585980127AB04BB8B869C7B7927204776BEE2B4286769182D9496438F4FFA3E09C81C5C64E7FE4DECCD3215271A638EA6856";
    public static final String PRIVATE_KEY = "4FD37E88D6D0EC7AD7F179336E64A09DB31B3A61796764514FAA7E055F678AA2";

    public static final String DEV_TYPE = "StopTerminal";
    public static final String TAG = "railing";
    public static final String FORAMT_TIME = "yyyy-MM-dd HH:mm:ss";
    public static final Map<Integer, String> FILE_PATH_INFO = new HashMap<Integer, String>();


    public static final int PAY_SUCCES_EVENT = 0;

    // 手动结束加油
    public static final String MANUAL_CLOSE = "1";
    // 自动结束加油
    public static final String AUTO_CLOSE = "2";
    //ca秘要保存路径
    public static final int CA_FILE_PATH_DIR = 1;
    //文件路径
    public static final int FILE_PATH_DIR = 2;


    //数据库保存路径
    public static final int DB_FILE_PATH_DIR = 3;
    //log路径
    public static final int FILE_PATH_DIR_LOG = 4;
    //crash路径
    public static final int FILE_PATH_DIR_LOG_CRASH = 5;

    //crash路径
    public static final int FILE_PATH_DIR_APK = 6;
    public static final String PATH_LOGCAT = Environment.getExternalStorageDirectory().getAbsolutePath();

    static {
        FILE_PATH_INFO.put(CA_FILE_PATH_DIR,         "/sdcard/com.olc.railing/ca/");
        FILE_PATH_INFO.put(FILE_PATH_DIR,            "/sdcard/com.olc.railing/");
        FILE_PATH_INFO.put(DB_FILE_PATH_DIR,         "/sdcard/com.olc.railing/databases/");
        FILE_PATH_INFO.put(FILE_PATH_DIR_LOG,        "/sdcard/com.olc.railing/log/");
        FILE_PATH_INFO.put(FILE_PATH_DIR_APK,        "/sdcard/com.olc.railing/apk/");
        FILE_PATH_INFO.put(FILE_PATH_DIR_LOG_CRASH,  "/sdcard/com.olc.railing/crash/");
    }
}
